import request from '@/utils/request'

// 查询视频互动列表
export function listInteractions(query) {
  return request({
    url: '/system/interactions/list',
    method: 'get',
    params: query
  })
}

// 查询视频互动详细
export function getInteractions(id) {
  return request({
    url: '/system/interactions/' + id,
    method: 'get'
  })
}

// 新增视频互动
export function addInteractions(data) {
  return request({
    url: '/system/interactions',
    method: 'post',
    data: data
  })
}

// 修改视频互动
export function updateInteractions(data) {
  return request({
    url: '/system/interactions',
    method: 'put',
    data: data
  })
}

// 删除视频互动
export function delInteractions(id) {
  return request({
    url: '/system/interactions/' + id,
    method: 'delete'
  })
}

// 获取最新点赞数据
export function getRecentLikes() {
  return request({
    url: '/system/interactions/recent-likes',
    method: 'get'
  })
}

// 获取最新收藏数据
export function getRecentCollects() {
  return request({
    url: '/system/interactions/recent-collects',
    method: 'get'
  })
}

// 获取最新关注数据
export function getRecentFollows() {
  return request({
    url: '/system/interactions/recent-follows',
    method: 'get'
  })
}

// 获取今日统计数据
export function getTodayStats() {
  return request({
    url: '/system/interactions/today-stats',
    method: 'get'
  })
}

// 获取最新评论数据
export function getRecentComments() {
  return request({
    url: '/system/interactions/recent-comments',
    method: 'get'
  })
}

// 禁用评论
export function disableComment(commentId) {
  return request({
    url: `/system/interactions/disable-comment/${commentId}`,
    method: 'put'
  })
}

// 启用评论
export function enableComment(commentId) {
  return request({
    url: `/system/interactions/enable-comment/${commentId}`,
    method: 'put'
  })
}